home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
e-lang
/
realgaug.lha
/
Gauge.Doc
< prev
next >
Wrap
Text File
|
1980-01-01
|
10KB
|
228 lines
--------------------------------------------------------------------
`Gauge plugin`-module V1.1
(w) 1996 by by Daniel `ThunderPig` Raedel/NEUDELSoft
--------------------------------------------------------------------
| I apologize for any grammatical and/or orthographical errors |
--------------------------------------------------------------------
This stuff is em@ilware - send me a mail and I will send you the
newest version of this module (if there is any ;) - perhaps with
your ideas implemented?
It is not allowed to spread this archive in a commercial way without
asking for my permission!!!!
I will take *NO* responsibility for anything that might (or might
not) happen while using this module... okay: if there should come
a really pretty (and not too dumb :) girl along your way right after
playing around with this module: send her to me - I lost her in the
source code ;-))
--------------------------------------------------------------------
Using this plugin in conjunction with the `easygui` module by Wouter,
you are able to use gauge bars of every kind (well, there are three
different ones - each with a lot of features: horizontal and vertical
bars, horiz. and vert. `volume-slider`-like things and... round
`speed-o-meter`-like ones!!). You are even able to use them as
replace for the boring slider bar as they can interact with your
PROCs like all other easygui implementations. Take a look at Gauge_Test
to see what I mean...
Of course you may use this module without easygui, too - but then
*you* have to look for the right coordinates :)
It should be obvious that you need at least V37 to use this module...
--------------------------------------------------------------------
If you find any bugs or have some ideas in order to improve the module
- write me!
em@il: p5dara@dagobert.rz.uni-jena.de
thunder@mipool.rz.uni-jena.de
snail mail:
Daniel Raedel
Fuchsloecherstr. 28 Margaretenstr. 52/2
07749 Jena 88045 Friedrichshafen
(during term time (Mom's ad :)
- and most of the
rest time, too)
--------------------------------------------------------------------
Things I will optimize when I'm not busy:
* implement possibility to place some extra text
around gfx (does someone really want this?)
* speed up the routine that paints the `round`-type
bars... (I know how, I still have not the time
to f*#% around with guru meditations while
accessing the bitplanes directly :(
--------------------------------------------------------------------
PROCs in the module:
NEW gauge_bar.init_gauge([taglist]):
This is the routine to initialize your plugin. Don't forget
to END gauge_bar when you've finished!
The tags are described later.
set_text:=gauge_bar.settext(window,text):
Change the text after you have created the plugin
(...but you can't change the TextLen anymore!)
set_num:=gauge_bar.setgauge(window,num):
Change the current `fill status` of the plugin. The
module will itself look that you don't break the
boundaries (min and max value).
-< Using the other routines is not recommended >-
--------------------------------------------------------------------
The tags this plugin understands:
---------------------------------
GA_Screen (APTR): a pointer to the screen the gui will be
opened on. If omitted, the module will get
its informations (VisualInfo and DrawInfo)
from the default public screen. Use this if you
intend to open the gui on an other than the
DefaultPubScreen (e.g. Workbench).
DEFAULT: NIL (= default pub screen)
-< new in V1.1 - something really important I forgot in V1.0 :-( >-
GA_Min (INT): The minimum value to display; DEFAULT: 0
GA_Max (INT): the maximum value; DEFAULT: 100
GA_Current (INT): the value the plugin shall display
when initialized; DEFAULT: 0
GA_BorderRecessed (BOOL): If you want a recessed border around
the normal gauge bars ; DEFAULT: FALSE
GA_BarPen (CHAR) : colour number to use for the bar in the
normal gauge bars
DEFAULT: DrawInfo.Pens[FillPen]
GA_backgroundPen (CHAR): colour number that is to be used to
fill the `empty` field in the gauge bar and to
fill the knob of the volume slider
GA_TextPtr (APTR): Ptr to a string or Array of Chars; this text
will be used when displaying information inside (or
around) the plugin. Will be ignored until GA_TextLen
is greater than 0. DEFAULT: 'ThunderPig' ;-)
GA_TextLen (CHAR): The length of the text GA_TextPtr points to.
This can't be modified later!
DEFAULT: 0 (=> no text)
GA_TextPen (CHAR): Farbe für Text; DEFAULT:
DrawInfo.Pens[TextPen]
GA_Percentage (BOOL): Use this if you want the plugin to
automatically write the actual value of the
plugin in percent in (or around) the plugin.
Activating this tag means that GA_TextPtr and
GA_TextLen will be ignored!
DEFAULT: FALSE
GA_IsVertical (BOOL): Turn the gauge bar or the volume
slider by 90 degrees. The plugin will
be `filled` from bottom to top.
DEFAULT: FALSE
GA_FixedWidth (INT),
GA_FixedHeight (INT): If you want the plugin to have a fixed
width/height. The module will adjust this value if
you set it to a number that is smaller than
the minimum width/height required.
DEFAULT: 0 (=> no fixed width/height)
GA_Bar3D (BOOL): The bar in the normal gauge bar will be
drawed with a 3-dimensional border around.
DEFAULT: FALSE
GA_BarRecessed (BOOL): When using GA_Bar3D, you may use this
tag to draw the recessed version of the border
around the bar. DEFAULT: FALSE
GA_IsRound (BOOL): Draw the plugin as some kind of speed-o-meter;
This plugin will resize in x- *and-* y-direction if
no fixed width is specified (fixed height will be
ignored). Also, all `normal gauge bar`-specific
tags (bar3D, BorderRecessed, ...) will be ignored.
Text will be written inside the gfx.
DEFAULT: FALSE
GA_RoundPointerPen (CHAR): the colour number that shall be used
for the pointer inside the `speed-o-meter`-like
plugin. DEFAULT: Drawinfo.pens[SHINEPEN]
GA_IsVolumeSlider (BOOL): If you want the plugin to look like
a `volume slider`. GA_IsRound and the special bar tags
will be ignored (but you may use GA_IsVertical).
Text will be placed to the left/right of the slider
(over/under the slider if it's a vertical one).
DEFAULT: FALSE
GA_RightText (BOOL): To display the text to the right of the
volume slider (under it if GA_IsVertical is set).
DEFAULT: FALSE
GA_GaugeUsable (BOOL): This enables the possibility to use the
plugin to directly change values, not only to
display them. Should be used with GA_ActionProc as
it makes no sense alone.
Using this tag, you convert every one of those
plugins into real sliders!
-<see Gauge_Test.e! >-
GA_ActionProc (APTR): A ptr to a procedure (-> {myproc} ) that will
be called every time the value of the plugin changes
(if GA_GaugeUsable=TRUE).
This procedure must have *two* parameters: gauge_id and
current_value. So your proc should look the following:
PROC myproc(id, val)
...
ENDPROC
-<see Gauge_Test.e! >-
GA_GaugeID (CHAR): An identification number the plugin will use
when it calls your `ActionProc`. Using different IDs
for different plugins (recommended...:-), you may
pass the same procedure to every plugin. The procedure
will then be able to select certain actions for every
one of the calling plugins.
-<see Gauge_Test.e! >-
--------------------------------------------------------------------
If you have any questions: my ad can be found above...
--------------------------------------------------------------------
History:
V1.0 Very first (and released) Version, written between
26-April-96 and 04-May-96
V1.1 Blame on me! I forgot one of the most important tags!
Now included `GA_Screen` (select the screen from where
the plugin has to obtain VisulaInfo and DrawInfo in
order to draw the gfx in the way the user/coder defined
it).
Fixed 06-May-96
EOF.